package com.prp.gwt.client.user.profile;

import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.prp.gwt.client.ClientConstants;
import com.prp.gwt.client.widgets.UserBarPanel;

public class ProfileHistoryHandler implements ValueChangeHandler<String> {

	public static final String INIT_VALUE = "profile";
	
	@Override
	public void onValueChange(ValueChangeEvent<String> event) {
		String history = event.getValue();
		if (history.equals(INIT_VALUE)) {
			ProfileListener.getInstance().getUser(-1);
			UserBarPanel.getInstance().selectTab(ClientConstants.INDEX_PROFILE);
		} 
	}

}
